﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Coco.Infrastructure;
using System.Data.Linq.Mapping;

namespace Coco.Models
{
    [Table(Name = "TodoItems")]
    public class TodoItemInfo : NotificationObject
    {
        public TodoItemInfo() { }

        #region Fields
        private string guid = System.Guid.NewGuid().ToString();
        private string title;
        private DateTime time = DateTime.Now;
        private string content;
        private string place;
        private bool completed = false;
        private bool ringtoneAlert = true;
        private int alertMinutes = 15;
        #endregion

        #region Properties
        [Column]
        public string Guid
        {
            get { return guid; }
            set
            {
                guid = value;
                RaisePropertyChanged(() => Guid);
            }
        }

        [Column]
        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                RaisePropertyChanged(() => Title);
            }
        }

        [Column]
        public DateTime Time
        {
            get { return time; }
            set
            {
                time = value;
                RaisePropertyChanged(() => Time);
            }
        }

        [Column]
        public string Content
        {
            get { return content; }
            set
            {
                content = value;
                RaisePropertyChanged(() => Content);
            }
        }

        [Column]
        public string Place
        {
            get { return place; }
            set
            {
                place = value;
                RaisePropertyChanged(() => Place);
            }
        }

        [Column]
        public bool Completed
        {
            get { return completed; }
            set
            {
                completed = value;
                RaisePropertyChanged(() => Completed);
            }
        }

        [Column]
        public bool RingtoneAlert
        {
            get { return ringtoneAlert; }
            set
            {
                ringtoneAlert = value;
                RaisePropertyChanged(() => RingtoneAlert);
            }
        }

        [Column]
        public int AlertMinutes
        {
            get { return alertMinutes; }
            set
            {
                alertMinutes = value;
                RaisePropertyChanged(() => AlertMinutes);
            }
        }
        #endregion
    }
}
